fix: sync current x401 wire names#7
Conversation
frostevent
left a comment
There was a problem hiding this comment.
Thank you for your contribution 👍
I'm wondering, if you used AI to help you put up this PR, did it leverage https://github.com/proof/x401-node/blob/main/spec/UPGRADING.md and worked seamlessly? Any updates you'd like to see in that file to facilitate future upgrades?
| | Token Object `token_type` MUST be `"Bearer"`; `access_token` REQUIRED | `validate.ts` `parseX401TokenObject`; `agent.ts` `buildTokenObject` | | ||
| | Error Object `error` REQUIRED | `validate.ts` `parseX401ErrorObject` | | ||
| | Token-exchange fixed params (`grant_type`, `subject_token_type`, Bearer) MUST NOT be repeated in the payload | not present in the payload type; set only on the form by `agent.ts` `buildTokenExchangeForm`; verified by `verifier.ts` `parseTokenExchange`. Test: `x401.test.ts` | | ||
| | Embedded `<data>`: tag `data`, `value="application/json;x401=proof-required"`, `hidden`, single JSON object that is a valid payload and SHOULD include a `$schema` member = `https://x401.id/spec/schemas/request.json` | `verifier.ts` `embedHtmlData`; `agent.ts` `detectProofRequirement` plus `parseX401Payload`. Test: `x401.test.ts` | |
There was a problem hiding this comment.
The specification reads "MUST include a $schema member" https://x401.proof.com/spec/latest/#embedded-proof-requirements-in-html-content.
Repin the private x401 integration fixture to @proof.com/[email protected] and add a Proof VC Common verifier bridge for caller-owned x401 result evidence. Refresh D134 and the Proof thread map now that proof/x401-node#7 is merged and #18/#20/#21 are closed upstream.
|
Thanks again for the review and merge. To answer your upgrade-guide question directly: yes, the PR was AI-assisted. I missed After your review I read it and applied it to The lesson I took from this is that the upgrade runbook should be the first step for spec sync work, especially when Appendix C and prose requirements differ by carrier. |
Summary
Updates the Node SDK to match the current hosted x401 v0.2.0 wire surface from proof/x401 main.
Checks